package com.qifenqian.turbot.widget;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.qifenqian.turbot.R;

/**
 * @author H
 * @createDate 2018/6/30 12:10
 * @reference
 * @updateDate
 * @description 加载显示的进度框
 * @detail
 * @since
 */
public class LoadingDialog extends Dialog {

    public LoadingDialog(@NonNull Context context) {
        super(context, R.style.Loading);
        init();
    }

    private void init() {
        setCancelable(true);
        setContentView(R.layout.dialog_loading);
        setCanceledOnTouchOutside(false);
    }

    public LoadingDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
        init();
    }

    protected LoadingDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
        init();
    }
}
